package com.huanwei.login_regist;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.huanwei.cc.R;
import com.huanwei.cc.activity.GongGaoList_activity;
import com.huanwei.cc.activity.XianYiRen_activity;
import com.huanwei.cc.activity.Main3Activity;
import com.huanwei.cc.activity.Me_data_activity;
import com.huanwei.cc.activity.wdKBList_activity;
import com.huanwei.cc.activity.Me_set_activity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import me.drakeet.materialdialog.MaterialDialog;

/**
 * 首页
 */
public class Student_Activity extends Activity {

    View view;
    @BindView(R.id.im_gydt)
    ImageView imGydt;
    @BindView(R.id.layout_gydt)
    RelativeLayout layoutGydt;
    @BindView(R.id.im_cdhq)
    ImageView imCdhq;
    @BindView(R.id.layout_schq)
    RelativeLayout layoutSchq;
    @BindView(R.id.im_wdcg)
    ImageView imWdcg;
    @BindView(R.id.layout_wdcg)
    RelativeLayout layoutWdcg;
    @BindView(R.id.imageView4)
    ImageView imageView4;
    @BindView(R.id.textView16)
    TextView textView16;
    @BindView(R.id.imageView7)
    ImageView imageView7;
    @BindView(R.id.imageView5)
    ImageView imageView5;
    @BindView(R.id.textView13)
    TextView textView13;
    @BindView(R.id.keb)
    RelativeLayout keb;
    @BindView(R.id.imageView6)
    ImageView imageView6;
    @BindView(R.id.textView15)
    TextView textView15;
    @BindView(R.id.textView3)
    TextView textView3;
    @BindView(R.id.textView4)
    TextView textView4;
    @BindView(R.id.textView5)
    TextView textView5;
    @BindView(R.id.textView6)
    TextView textView6;
    @BindView(R.id.imageView)
    ImageView imageView;
    @BindView(R.id.textView2)
    TextView textView2;
    @BindView(R.id.im_sc)
    ImageView imSc;

    @BindView(R.id.textView8)
    TextView textView8;

    @BindView(R.id.im_sg)
    ImageView imSg;

    @BindView(R.id.textView9)
    TextView textView9;

    @BindView(R.id.im_dl)
    ImageView imDl;

    @BindView(R.id.textView10)
    TextView textView10;

    @BindView(R.id.im_gg)
    ImageView imGg;

    @BindView(R.id.textView11)
    TextView textView11;


    @BindView(R.id.xuanze)
    RelativeLayout xuanze;
    @BindView(R.id.xyxw)
    RelativeLayout xyxw;
    @BindView(R.id.layout_teacher1)
    RelativeLayout layoutTeacher1;
    @BindView(R.id.layout_teacher2)
    RelativeLayout layoutTeacher2;
    @BindView(R.id.layout_teacher3)
    RelativeLayout layoutTeacher3;
    @BindView(R.id.layout_teacher4)
    RelativeLayout layoutTeacher4;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_studentshou_y);
        //绑定控件
        ButterKnife.bind(this);


    }


    MaterialDialog mMaterialDialog;

    public void show() {
        mMaterialDialog = new MaterialDialog(this)
                .setTitle("提示")
                .setMessage("请选择学院!")
                .setPositiveButton("数计院", new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        textView16.setText("数计院");
                        mMaterialDialog.dismiss();

                    }
                })
                .setNegativeButton("生科院", new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        textView16.setText("生科院");
                        mMaterialDialog.dismiss();

                    }
                });

        mMaterialDialog.show();
    }


    @OnClick({R.id.layout_teacher1,
            R.id.meishi,
            R.id.
                    jieshao, R.id.layout_teacher2, R.id.layout_teacher3, R.id.layout_teacher4, R.id.im_gydt, R.id.layout_gydt, R.id.keb, R.id.xuanze, R.id.xyxw})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.layout_teacher1:
//                学生 我的考勤
                startActivity(new Intent(this, XianYiRen_activity.class));
                break;
            case R.id.layout_teacher2:
                startActivity(new Intent(this, wdKBList_activity.class));
                break;
            case R.id.layout_teacher3:
                startActivity(new Intent(this, Me_data_activity.class));
                break;
            case R.id.layout_teacher4:
                startActivity(new Intent(this, Me_set_activity.class));
                break;
            case R.id.keb:
                startActivity(new Intent(this, Main3Activity.class));
                break;
            case R.id.xyxw:
                //成绩查询
                startActivity(new Intent(this, GongGaoList_activity.class));
                break;
            case R.id.xuanze:
//                Toast.makeText(getContext(), "2222", Toast.LENGTH_SHORT).show();
                show();
                break;
            case R.id.jieshao:

//                startActivity(new Intent(this, School_oneActivity.class));
                break;

            case R.id.meishi:
//                laoshishangban();
//                startActivity(new Intent(getActivity(), ZhouBian_Activity.class));
                break;

        }
    }

//    public void laoshishangban() {
//        API.TeacherSign(new Okhttp.Objectcallback() {
//            @Override
//            public void onsuccess(String st) {
//                Log.e("aa", "xx" + st);
//
//            }
//
//            @Override
//            public void onFalia(int code, String errst) {
//                Log.e("aa", "xx" + errst);
//            }
//        });
//
//    }
}
